package com.jacobson.huobi.utils;

import android.util.Base64;
import android.util.Log;


public class Base64Util {

    /**
     * base64加密
     * @param content
     * @return
     */
    public static String EncoderStr(String content) {
        try {
            //Base64 加密
            return Base64.encodeToString(content.getBytes(), Base64.DEFAULT);
        }catch (Exception e) {

            return null;
        }
    }


    /**
     * base64解密
     * @param content
     * @return
     */
    public static String DecoderStr(String content) {
        try {
            //Base64 解密
            return new String(Base64.decode(content.getBytes(), Base64.DEFAULT));
        }catch (Exception e) {
            return null;
        }
    }
}
